1. Field of the Invention
This invention relates generally to the field of controlling of machines using a programmable controller (PC), and, more particularly, to a PC executing a program written in the sequential function chart (SFC) programming language.
2. Description of the Prior Art
FIG. 7 is a block diagram of a known PC used for executing a control program written in an SFC language to control an object, such as a machine. The PC comprises a sequence chart controller 2 for performing control of the PC, a sequence chart table 3 having a transition table for storing transition information used in comparison to input conditions of the machine, and an output table 5 for storing output signal numbers making up the control program used to control the operation of the machine. Both the transition information stored in transition table 4 and the output signal numbers stored in the output table 5 are sequentially arranged according to the sequence of step numbers 0, 1, 2 . . . 7, E set forth in the sequence chart of FIG. 9.
FIG. 10 illustrates the contents of sequence chart table 3 (FIG. 7). In particular, the figure illustrates the transition information stored in transition table 4 according to step numbers 0-E. The figure also illustrates the output signal numbers stored in the output table 5 according to step numbers 0-E.
The PC 1 controls a machine (not shown) according to the execution by sequence chart controller 2 of a sequence of steps 0-E making up the control program stored in sequence chart table 3. With reference to FIG. 8, it can be seen that the sequence chart controller 2 starts the execution at step 200. The controller 2 first obtains the step number stored in active step number table 6 (FIG. 7). This is performed in block 201. The controller 2 determines whether or not the indicated step is an END (E) step. If the E step is determined, the execution proceeds to block 210 and is completed. If, on the other hand, the step is not an E step, then the execution of the program advances to block 203. In this block, the sequence chart controller 2 obtains the output number from the output table 5 corresponding to the active step stored in active step table 6 (FIG. 10). This output number is sent by the PC 1 to the output signal line 11 (FIG. 7) in block 204. The controller 2 then obtains transition information corresponding to the active step number from the transition table 4 (FIG. 10) during block 205. At decision block 206, the controller 2 determines whether or not an input signal X has been received over input signal line 9 (FIG. 7), and if it matches the transition information stored in transition table 4 corresponding to the active step number currently being executed. If there has not been a favorable comparison, then the execution moves back to block 201 without any further operation. If, on the other hand, there has been a favorable comparison to the transition information, then a pointer is shifted to a subsequent step number in the transition table 4. That subsequent step number is stored in active step number table 6 (block 207). In block 209, the sequence chart controller 2 switches off the signal being output over signal line 11 (FIG. 7) and the execution of the program returns to block 201.
As described above, output table 5 (FIG. 10) stores a series of output signal numbers Y0, Y1, Y2, Y12, Y11, Y10 according to steps 1-6, respectively. These output signal numbers are output by the PC 1 over signal line 11 under control of sequence chart controller 2 (FIG. 7). The output numbers are used by the PC 1 to control the machine (not shown), where each output number forces the machine to perform a different function. To allow the PC 1 to more fully control the operation of the machine, feedback signals are received as input signals over signal line 9 (FIG. 7). The feedback signals can be output by limit switches (not shown) that indicate when a machine operation has been performed to a certain limit. Transition information X0, X1, X2, X12, X11, X10 stored in transition table 4 according to steps 1-6, respectively, allow the PC 1 to determine when these limits, indicated by the feedback signals, have been reached in the operation of the machine.
For example, if the active step number 1 stored in step number table 6 (FIG. 7) is currently being executed, then an output number Y0 (FIG. 10) will be output over signal line 11, causing a machine to perform an operation. Specifically, for example the output Y0 may cause a clamp 1 (not shown) of the machine to perform movement operation up until a specified position designated by limit switch X0 is detected (all switches may be logical switches). Upon this detection, input data X0 will be transmitted over signal line 9 and received by PC 1. During this time, the sequence chart controller 2 obtains the transition information X0 corresponding to the step number 1 currently being executed. Upon detecting a favorable comparison between the input signal data and the transition information stored in transition table 4, the sequence controller 2 terminates the output of signal number Y0 and advances to the next subsequent step number in transition table 4. This step number is stored in active step number table 6.
The execution of the sequence is then continued for step numbers 2-E (FIG. 9). As can be seen from FIG. 10, output numbers Y1, Y2, Y12, Y11 and Y10 will be output in the manner described above until limit switch data X1, X2, X12, X11 and X10 are detected by the sequence controller 2, respectively. In this known structure, output Y1 causes a clamp 2 (not shown) to perform an operation until a position is detected by limit switch X1. Output Y2 causes a gauge (not shown) to perform an operation in one direction up until a specified limit switch X2. After that, an output Y12 causes the same gauge to perform a return operation to the position specified by limit switch X12. Then outputs Y10 and Y11 cause clamps 1 and 2 to perform return operations up to the position specified by limit switches X10 and X11, respectively. The above operations can be seen in the timing chart in FIG. 3, and are written in the SFC language as shown in FIG. 9.
FIG. 9 more clearly depicts the sequence of steps making up the control program described above. The blocks having numerals inserted therein depict the sequence of steps 1-7 performed by the sequence controller 2. During step 1, it can be seen that an output number Y0 is output, as described above, until transition information X0 is received by the sequence controller 2. After this time, sequence step 2 is performed, outputting a number Y1 until a transition information X1 is received by sequence controller 2 over the input signal line 9. A similar pattern of events occurs until step 7 is executed and step E is determined. After detecting step E, sequence controller 2 terminates the execution of the program and, thus, terminates the control of the machine.
The above-described PC known in the art is only allowed to execute the SFC language sequence chart in the order of step numbers 0-E set forth in the sequence chart of FIG. 9. If the machine that is controlled has stopped due to a fault, for example, the operation cannot be resumed by reversing the operation of the machine so that the cause of the fault can be removed.
Accordingly, a need exists in the art for a process of running a programmable controller (PC) that executes a program written in an SFC language which allows an SFC language sequence chart to be executed in the reverse direction so that the object to be controlled may be controlled in the reverse operation. Moreover, there is a need in the art for reversing the operation so that the occurrence of a fault resulting in stoppage of machine operation can be removed without requiring the restarting of machine operation from the beginning of the sequence. Often, reverse operation of only a step or two can remedy the problem and allow normal operations to resume.